/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managedBeans;

import facade.SuiLibFacade;
import facade.exception.NotExistingObjectException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import managedBeans.util.CourseToEdit;
import managedBeans.util.NodeToView;
import service.ServiceFactory;
import valueObject.NodeVO;

/**
 *
 * @author David
 */
public class viewCourse {

    
    private NodeVO nodeVo;
    @EJB
    private SuiLibFacade suilibFacade;
    /**
     * Creates a new instance of viewCourse
     */
    public viewCourse() {
    }
    
     public String descriprion() {
        
        try {
          nodeVo = suilibFacade.findNodeById(NodeToView.getInstance().getId()); 
        } catch (NotExistingObjectException ex) {
            Logger.getLogger(editCourseMB.class.getName()).log(Level.SEVERE, null, ex);
        }
        return nodeVo.getDescription();
    }

    /**
     * @return the nodeVo
     */
    public NodeVO getNodeVo() {
        return nodeVo;
    }

    /**
     * @param nodeVo the nodeVo to set
     */
    public void setNodeVo(NodeVO nodeVo) {
        this.nodeVo = nodeVo;
    }
    
    
}
